home *** CD-ROM | disk | FTP | other *** search
/ HTBasic 9.3 / HTBasic 9.3.iso / LgcyPlus / disk2 / BARTEST._ / BARTEST.
Encoding:
Text File  |  2001-03-02  |  1.1 KB  |  31 lines

  1. 10    ! **********************************************************
  2. 20    ! Example: BAR Test
  3. 30    !
  4. 40    ! This program creates a BAR widget with three ranges.
  5. 50    ! As the bar height progesses from the LOW range through
  6. 60    ! the middle range to the HIGH range, the bar color changes
  7. 70    ! from green to yellow to red. When the bar is in the LOW
  8. 80    ! or the HIGH range, the program beeps throughout the range.
  9. 90    !
  10. 100   ! **********************************************************
  11. 110   !
  12. 120   INTEGER N,M
  13. 130   ASSIGN @Bar TO WIDGET "BAR"
  14. 140   CONTROL @Bar;SET ("TITLE":" Example: BAR Test")
  15. 150   CONTROL @Bar;SET ("X":100,"Y":20,"WIDTH":200,"HEIGHT":200)
  16. 160   CONTROL @Bar;SET ("ALARM RANGES":"LOW,HIGH","ALARM TYPE":"BEEP")
  17. 170   CONTROL @Bar;SET ("LOW LIMIT":10,"HIGH LIMIT":90)
  18. 180   CONTROL @Bar;SET ("SYSTEM MENU":"Quit")
  19. 190   ON EVENT @Bar,"SYSTEM MENU" GOTO Finis
  20. 200   !
  21. 210   FOR M=1 TO 3
  22. 220     FOR N=1 TO 100
  23. 230       WAIT .05
  24. 240       CONTROL @Bar;SET ("VALUE":N)
  25. 250     NEXT N
  26. 260     WAIT 1
  27. 270   NEXT M
  28. 280   !
  29. 290 Finis:   !
  30. 300   END
  31.